package cn.wp.ewallet.upms.web.controller;

import cn.wp.common.core.Wp;
import cn.wp.common.core.dto.WpResult;
import cn.wp.common.core.model.WpTree;
import cn.wp.ewallet.upms.service.BsFuncMenuInfoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.Iterator;
import java.util.List;

/**
 * 功能菜单-控制层
 * Created by zhangyongli on 2019/12/25
 */
@RestController
@RequestMapping(Wp.WebContext + "/ewallet/upms/menu")
@Api(tags = "功能菜单")
public class BsFuncMenuInfoController {

    @Autowired
    private BsFuncMenuInfoService bsFuncMenuInfoService;

    @GetMapping("/list")
    @ApiOperation(value = "获取授权菜单")
    public WpResult getBsFuncMenuInfoBySystemUserId() {
        List<WpTree> wpResult = bsFuncMenuInfoService.getBsFuncMenuInfoBySystemUserId();
       
        return new WpResult().success(wpResult);
    }

}